#ifndef DEV_READER_HF_H
#define DEV_READER_HF_H

#include "ae_device.h"

#include "rfidlib_aip_iso15693.h"
#include "rfidlib_aip_iso14443A.h"
#include "rfidlib_aip_iso18000p3m3.h"



using namespace std;

class CAEDevice_HF : public CAEDevice
{
public:
    CAEDevice_HF();
    ~CAEDevice_HF();

    err_t func_Inventory();

    err_t func_AccessTag_WriteData(CTag &tag, DWORD block_addr, DWORD block_num, BYTE *data, DWORD dlen);
    err_t func_AccessTag_ReadData(CTag &tag, DWORD block_addr, DWORD block_num, BYTE *data, DWORD *dlen);

private:
    err_t func_AccessTag_GetInfor(CTag &tag, BYTE *dsfid, BYTE *afi,DWORD *block_size,DWORD *block_num, BYTE *ic_ref);
    err_t func_AccessTag_Check_EAS(CTag &tag, BYTE &eas_sta);
    err_t func_AccessTag_EnDisable_EAS(CTag &tag, bool bEnable);
    err_t func_AccessTag_Write_AFI(CTag &tag, BYTE afi);

    void AddNewISO15693Tag(UINT32 apl_tid, UINT32 picc_tid, UINT32 ant_id, UINT8 dsfid, UINT8 *uid,USHORT rssi);
    void AddNewISO14443ATag(UINT32 apl_tid, UINT32 picc_tid, UINT32 ant_id, UINT8 *uid, UINT8 uidlen);
    err_t AccessTag_Connect(CTag &tag, RFID_TAG_HANDLE *ht);
    err_t AccessTag_Disconnect(CTag &tag, RFID_HANDLE ht);
    err_t AccessTag_ResetAntenna(BYTE mAnt);

};

#endif // DEV_READER_HF_H
